#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include "punct_stream.h"

using namespace std;
int main()
{
    Punct_stream ps(cin);
    ps.whitespace(";:,.?!()\"{}<>/&$@#%^*|~");
    ps.case_sensitive(false);
    vector<string> words;
    for (string word; ps >> word;)
    {
        words.push_back(word);
    }
    sort(words.begin(), words.end());
    for (int i = 0; i < words.size(); ++i)
    {
        if (i == 0 || words[i - 1] != words[i])
        {
            cout << words[i] << '\n';
        }
    }
    return 0;
}